package com.zhehekeji.opsys.api.entity;

// Generated 2017-3-27 16:00:54 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * TSigninPrize generated by hbm2java
 */
@Entity
@Table(name="t_signin_prize")
public class TSigninPrize implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8796482782955325716L;
	private Long id;
	private String code;
	private String name;
	private Integer type;
	private Integer limitNum;
	private Integer number;
	private Integer exchangeNum;
	private Integer consumeGold;
	private Integer price;
	private String picture;
	private Integer sequence;
	private Date createTime;
	private Integer status;
	private Long cpCode;
	private TSignin tsignin;
	
	private Long cardId;
	
	private Integer verctrl;
	public TSigninPrize() {
	}
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="CODE",length=64,nullable=true)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	@Column(name="NAME",length=128,nullable=true)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@Column(name="TYPE",length=2,nullable=true)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	@Column(name="LIMIT_NUM",length=2,nullable=true)
	public Integer getLimitNum() {
		return this.limitNum;
	}

	public void setLimitNum(Integer limitNum) {
		this.limitNum = limitNum;
	}
	@Column(name="NUMBER",length=11,nullable=true)
	public Integer getNumber() {
		return this.number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}
	@Column(name="EXCHANGE_NUM",length=11,nullable=true)
	public Integer getExchangeNum() {
		return this.exchangeNum;
	}

	public void setExchangeNum(Integer exchangeNum) {
		this.exchangeNum = exchangeNum;
	}
	@Column(name="CONSUME_GOLD",length=11,nullable=true)
	public Integer getConsumeGold() {
		return this.consumeGold;
	}

	public void setConsumeGold(Integer consumeGold) {
		this.consumeGold = consumeGold;
	}
	@Column(name="PRICE",length=11,nullable=true)
	public Integer getPrice() {
		return this.price;
	}

	public void setPrice(Integer price) {
		this.price = price;
	}
	@Column(name="PICTURE",length=255,nullable=true)
	public String getPicture() {
		return this.picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}
	@Column(name="SEQUENCE",length=11,nullable=true)
	public Integer getSequence() {
		return sequence;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME", nullable=true)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name="STATUS",length=2,nullable=true)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return cpCode;
	}

	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}

	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER,optional=true)
	@JoinColumn(name="SIGNIN_ID")
	public TSignin getTsignin() {
		return tsignin;
	}

	public void setTsignin(TSignin tsignin) {
		this.tsignin = tsignin;
	}
	@Column(name="CARD_ID",length=20,nullable=true)
	public Long getCardId() {
		return cardId;
	}

	public void setCardId(Long cardId) {
		this.cardId = cardId;
	}
	@Version
	@Column(name="VERCTRL",length=11,nullable=true)
	public Integer getVerctrl() {
		return verctrl;
	}

	public void setVerctrl(Integer verctrl) {
		this.verctrl = verctrl;
	}
}
